﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Util
{
    public delegate String CommandDelegate(CommandInterpreter ci, String[] args);
    /// <summary>
    ///  An interface implemented by command functions typically added to a command interpreter
    /// </summary>
    /// 
    public class CommandInterface
    {
        public CommandInterface(CommandDelegate delegFunction, String helpString)
        {
            delegateCommand += delegFunction;
            getHelp = helpString;
        }
        /**
        /// Execute the given command.
         *
        /// @param ci   the command interpretere that invoked this command.
        /// @param args command line arguments (just like main).
        /// @return a command result
         */
        public CommandDelegate delegateCommand = null;


        /**
        /// Returns a one line description of the command
         *
        /// @return a one-liner help message
         */
         public String getHelp;
    }

    
}
